import 'package:distribution_mall_flutter/pages/home/domain/home_entity.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'app_info_state.freezed.dart';
part 'app_info_state.g.dart';

@freezed
class AppInfoState with _$AppInfoState {
  const factory AppInfoState(
      {AppInfoEntity? data,
      @Default(false) bool showVersionUpdate,
      @Default(false) bool showPatchUpdate,
      @Default(false) bool hideCancel,
      @Default('') String titleVersion,
      @Default('') String version,
      @Default('') String curTitleVersion,
      @Default(false) bool isUpdating,
      @Default('Go Download') String confirmText,
      @Default(false) bool canPop}) = _AppInfoState;

  factory AppInfoState.fromJson(Map<String, dynamic> json) =>
      _$AppInfoStateFromJson(json);
}
